home *** CD-ROM | disk | FTP | other *** search
- Path: central.bldrdoc.gov!news
- From: "G. C. Straty" <straty@harrier.bldrdoc.gov>
- Newsgroups: comp.lang.pascal.misc,comp.lang.pascal.borland,comp.programming,comp.lang.misc,comp.lang.c,comp.lang.c++
- Subject: Re: Writing an expression evaluator
- Date: Fri, 16 Feb 1996 17:01:49 -0700
- Organization: NIST
- Message-ID: <31251AED.78A3@harrier.bldrdoc.gov>
- References: <311FEBD8.7305@cnj.digex.net>
- NNTP-Posting-Host: harrier.bldrdoc.gov
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0b6b (Win16; I)
- CC: straty@bldrdoc.gov
-
- Aristotle wrote:
- >
- > Does anyone have any tips on how to go about writing an expression
- > evaluator(one complex enough to handle Trig. functions). I am writing a
- > program that uses expression and I would like to have the user be able to
- > enter their own expressions and have my program implement them. Any help
- > would be appreciated. Thanks in advance!
- >
- > John M. "Aristotle" De Cristofaro
-
- Borland Pascal-3 (if you can remember that far back) included
- source code for what they called MicroCalc, sample code for a
- basic spread sheet. In that code was a reasonably good function
- interpreter and evaluator which I have used often with good results.
- It will handle fairly complicated expressions as long as parens are
- not to deep. In digging through my stack of old 5.25 DDs I found
- I still have it. If you are interested, I would be happy to make it
- available to you.
-
- straty@bldrdoc.gov
-